package cn.tedu.myboot4.controller;

import cn.tedu.myboot4.entity.Emp;
import cn.tedu.myboot4.mapper.EmpMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class EmpController {
    @Autowired(required = false)
    EmpMapper mapper;
    @RequestMapping("/add")
    @ResponseBody
    public String insert (Emp emp){
        mapper.insert(emp);
        return "完成注册！";
    }
}
